//
//  AppRoutes.swift
//  APP
//
//  Created by Rdxer on 2017/12/8.
//  Copyright © 2017年 Rdxer. All rights reserved.
//

import UIKit

class AppRoutes: NSObject {
    
    public static let shared = AppRoutes.init()
    
    private override init() {}
    
    public func lauchAutoChooseVC() -> UIViewController{

        guard AuthManager.shared.isLogin else{
            return  LoginViewController.init()
        }
        
#if DEBUG

#else
    
//        guard AccountManager.shared.isVerificationSMSCode else{
//            return  SMSVerificationViewController.smsVVC_NAV()
//        }
    
 #endif
        
        
        return MainTabBarController.init()
    }
    
    /// 启动完毕 选择
    func switchToLauchAutoChooseVC(){
        AppDelegate.sheared?.window?.rootViewController = lauchAutoChooseVC()
    }
    
    /// 登录完毕 选择 最终都是 调用 switchToLauchAutoChooseVC()
    func switchToLoginedChooseVC(){
        switchToLauchAutoChooseVC()
    }
    
    /// 注销/退出登陆/登出 完毕 选择  最终都是 调用 switchToLauchAutoChooseVC()
    func switchToLogoutedChooseVC(){
        switchToLauchAutoChooseVC()
    }
    
//    func _switchToLoginVC(){
//        AppDelegate.sheared?.window?.rootViewController = LoginViewController.init()
//    }
//
//    func _switchToHomeVC(){
//        AppDelegate.sheared?.window?.rootViewController = MainTabBarController.init()
//    }
    
}


//extension AppDelegate{
//    
//}

